
public class CalculatorStack {
	private double x;
	private double y;
	private double z;
	private double t;

	void push(double value)
	{
		t = z;
		z = y;
		y = x;
		x = value;
	}

	double pop() {
		double result = x;
		x = y;
		y = z;
		z = t;
		t = 0;
		return result;
	}
	
	double peek()
	{
		return x;
	}
	
	void poke(double value)
	{
		x = value;
	}
	
	
	
	
	
}
